package hzjbbis.framework.workflow.service.impl;

import hzjbbis.framework.workflow.service.IServiceLocator;

import org.springframework.beans.factory.BeanFactory;

public class SpringServiceLocator implements IServiceLocator {
	private static BeanFactory beanFactory;
	
	public SpringServiceLocator() {
	}
	
	public SpringServiceLocator(BeanFactory beanFactory) {
		SpringServiceLocator.beanFactory = beanFactory;
	}
	
    public Object getService(String serviceName) {
        return beanFactory.getBean(serviceName);
    }
    
    public Object getBean(String beanName) {
		return beanFactory.getBean(beanName);
    }
}
